<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="top.jsp" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE HTML>
<html lang="en-US">
<head>
	<meta charset="UTF-8">
	<title>凯盛项目管理系统</title>
	<link rel="stylesheet" type="text/css" href="static/css/bootstrap.min.css" />
	<style type="text/css">
		body{
			padding-top:50px;
		}
	</style>
	
</head>
<body class="body">
	
	
	
	<div class="container">
	  <div class="row">
	  
		 <!-- 导入左侧部分 -->
		<jsp:include page="side.jsp">
			<jsp:param value="document" name="tag"/>
		</jsp:include>
		
		<div class="span9">
			<ul class="breadcrumb" style="margin-bottom:0px;border-radius: 3px 3px 0 0;margin-top:15px">
				<li class="active">
					<a href="document.jspx"><i class="icon-folder-open"></i>资料</a>
				</li>
				<li class="pull-right"><i class="icon-plus"></i><a href="document.jspx?m=new" class="link-black">分享新资料</a></li>
			</ul>
			<div class="well" style="margin-bottom:20px;background-color:#FFF;border: 1px solid #DDDDDD;">
			
			<c:if test="${fn:length(page.result)==0}">
				还没有任何资料！
			</c:if>
			
			<c:forEach items="${page.result}"  var="document">
				 <blockquote>
						<h4><a href="documentshow.jspx?id=${document.id }">${document.title}</a></h4>
					<p style="font-size:14px;line-height:1.5;">${document.content}</p>
					 <small>${document.user.name} ${document.stringtime}</small>
					  	<a href="document.jspx?m=toupdate&id=${document.id }" title="编辑"><i class="icon-pencil"></i></a>
				  		<a href="document.jspx?m=del&id=${document.id }" title="删除"><i class="icon-trash"></i></a>
				 </blockquote>
				</c:forEach>
			
			</div>
				<div class="span9" >
				  	<c:choose>
				  		<c:when test="${page.pageNum == 1 }">
				  			首页
				  		</c:when>
				  		<c:otherwise>
						  	<a href="document.jspx?p=1">首页</a>
				  		</c:otherwise>
				  	</c:choose>
				  	<c:choose>
				  		<c:when test="${page.pageNum == 1 }">
				  			上一页
				  		</c:when>
				  		<c:otherwise>
						  	<a href="document.jspx?p=${page.pageNum - 1 }">上一页</a>
				  		</c:otherwise>
				  	</c:choose>
				  	<c:choose>
				  		<c:when test="${page.pageNum == page.totalPages }">
				  			下一页
				  		</c:when>
				  		<c:otherwise>
						  	<a href="document.jspx?p=${page.pageNum + 1 }">下一页</a>
				  		</c:otherwise>
				  	</c:choose>
				  	<c:choose>
				  		<c:when test="${page.pageNum == page.totalPages }">
				  			尾页
				  		</c:when>
				  		<c:otherwise>
						  	<a href="document.jspx?p=${page.totalPages}">尾页</a>
				  		</c:otherwise>
				  	</c:choose>
				</div>
			
				
			</div>
		</div>
	  </div>
</body>
</html>
